﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Demo
{
    class Program
    {
        static void Main(string[] args)
        {
            Console.WriteLine("请输入要查看的作业：");
            int key = int.Parse(Console.ReadLine());
            switch (key)
            {
                case 1:
                    Demo01();
                    break;
                case 2:
                    Demo02();
                    break;
                case 3:
                    Demo03();
                    break;
                default:
                    break;
            }
        }
        public static void Demo01()
        {
            Console.WriteLine("请输入一个四位数：");
            int a = int.Parse(Console.ReadLine());

            int q;
            int w;
            int e;
            int r;
            q = a / 1000;
            w = (a - q * 1000) / 100;
            e = (a - q * 1000 - w * 100) / 10;
            r = (a - q * 1000 - w * 100 - e * 10) / 1;

            Console.WriteLine("千位数是：" + q);
            Console.WriteLine("百位数是：" + w);
            Console.WriteLine("十位数是：" + e);
            Console.WriteLine("个位数是：" + r);

            Console.ReadKey();
        }
        public static void Demo02()
        {
            Console.WriteLine("请输入半径R");
            double r = double.Parse(Console.ReadLine());
            double S = 3.14 * r * r;

            Console.WriteLine("圆的面积为：" + S);

            Console.ReadKey();
        }
        public static void Demo03()
        {
            Console.WriteLine("请输入三个数：");

            int num1 = int.Parse(Console.ReadLine());
            int num2 = int.Parse(Console.ReadLine());
            int num3 = int.Parse(Console.ReadLine());
            int max = num1;
            if (max < num2)
            {
               max = num2;
            }
            if (max < num3)
            {
                max = num3;
            }
            Console.WriteLine("这三个数中最大的值为:"+max);

            Console.ReadLine();
        }
    }
}